// swift-tools-version: 5.10
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "MyLibraryPackage",
    platforms: [.iOS("16")],
    products: [
        // Products define the executables and libraries a package produces, making them visible to other packages.
        //产品定义一个包产生的可执行文件和库，使它们对其他包可见。
        .library(
            name: "MyLibraryPackage",
            targets: ["MyLibraryPackage"]),
    ],
    dependencies: [
        .package(url: "https://github.com/onevcat/Kingfisher.git", .upToNextMajor(from: "8.1.0")),
        .package(url: "https://github.com/SwiftyJSON/SwiftyJSON.git", from: "5.0.2")
    ],
    targets: [
        // Targets are the basic building blocks of a package, defining a module or a test suite.
        // Targets can depend on other targets in this package and products from dependencies.
        //Targets是包的基本构建块，定义模块或测试套件。
        //Targets可以依赖于此包中的其他targets和依赖中的产品。
        .target(
            name: "MyLibraryPackage",
            dependencies: ["Kingfisher",
                           "SwiftyJSON",
                          ],
            resources: [
                 .process("Resources/text.txt")]
        ),
        .testTarget(
            name: "MyLibraryPackageTests",
            dependencies: ["MyLibraryPackage"]),
    ]
)
